<?php

namespace common\models\shop;

use Yii;

/**
 * This is the model class for table "shop_goods_option".
 *
 * @property integer $id
 * @property integer $goodsid
 * @property string $title
 * @property string $thumb
 * @property string $productprice
 * @property string $marketprice
 * @property string $costprice
 * @property integer $stock
 * @property string $weight
 * @property integer $displayorder
 * @property string $specs
 */
class ShopGoodsOption extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'shop_goods_option';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['goodsid', 'stock', 'displayorder'], 'integer'],
            [['productprice', 'marketprice', 'costprice', 'weight'], 'number'],
            [['specs'], 'string'],
            [['title'], 'string', 'max' => 50],
            [['thumb'], 'string', 'max' => 60],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'goodsid' => 'Goodsid',
            'title' => 'Title',
            'thumb' => 'Thumb',
            'productprice' => 'Productprice',
            'marketprice' => 'Marketprice',
            'costprice' => 'Costprice',
            'stock' => 'Stock',
            'weight' => 'Weight',
            'displayorder' => 'Displayorder',
            'specs' => 'Specs',
        ];
    }
}
